/*
PearReview - The peer review assistant.
Copyright (C) 2009  Dimitrij Pankratz, Anton Musichin
http://www.pearreview.com, info@pearreview.com

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

package com.pearreview.util;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.Serializable;

public abstract class DoubleClickMouseAdapter implements MouseListener,
		Serializable {
	private static final long serialVersionUID = -8717897839859502343L;
	@Override
	public final void mouseClicked(MouseEvent e) { }
	@Override
	public final void mouseEntered(MouseEvent e) { }
	@Override
	public final void mouseExited(MouseEvent e) { }
	@Override
	public final void mousePressed(MouseEvent e) { 
		if(e.getClickCount() % 2 == 0 && e.getButton() == MouseEvent.BUTTON1)
			mouseDoubleClicked(e);
	}
	@Override
	public final void mouseReleased(MouseEvent e) { }
	public abstract void mouseDoubleClicked(MouseEvent e);
}